#ifndef DATE_H
#define DATE_H

#include <ostream>

#include "date_exceptions.h"

class Date
{
	private:

		int year;
		int month;
		int day;

		bool is_leap_year() const throw();

		int get_days_in_month() const throw();

		int get_year_min() const throw();
		int get_year_max() const throw();
		int get_month_min() const throw();
		int get_month_max() const throw();
		int get_day_min() const throw();
		int get_day_max() const throw();

	public:

		Date() throw();
		///construct an invalid date

		Date(const int &p_year,const int &p_month, const int& p_day) throw();
		///construct a date without checking validity

		~Date() throw();

		bool is_valid_date() const throw();
		///year, month and day must be in a specified range
		
		int get_year() const throw();

		int get_month() const throw();

		int get_day() const throw();

		friend std::ostream& operator<<(std::ostream &p_out_stream, const Date &p_date) throw(Date_exceptions);
		///prints date in YYYY-MM-DD format

};

#endif
